        
<style type="text/css">
    .bot_bg_banner{ position: fixed; z-index: 998; bottom: 0; overflow: hidden;display: block;left: -100%;width: 100%;transition: all 0.3s;-webkit-transition: all 0.3s;}
    .bot_bg_banner a{ display: block;  }
    .bot_bg_banner span{ position: absolute; top: 0px; right: 0px; width: 40px;height: 40px;  text-align: center; display: block;line-height: 40px;font-size: 20px;font-weight: 400;}
    .bot_bg_banner img{ display: block; width: 100%; }
</style>
{% if user.email %}
{% else %}
    <div class="bot_bg_banner" >
        {% for item in catalog.fetchAd('home-bottom-banner').items %}
            <a href="{{ item.link }}"><img src="{{ item.image.getPath() }}" width="100%" style="display: block;"></a>
        {% endfor %}
        <span class="fa fa-close close_"></span>
    </div>
{% endif %}
{% put scripts %}
    <script type="text/javascript" src="{{ 'assets/js/jquery.cookie.js'|theme }}"></script>
    <script type="text/javascript">
        $(function(){
            $(".bot_bg_banner .close_").eq(0).click(function(){
                $(".bot_bg_banner").animate({"left":"-100%"},300);
                var index = 0; 
                $.cookie("current_sock", index);
            })  
            if ($.cookie("current_sock")!= null){
                var num_sock = $.cookie("current_sock");
                $(".bot_bg_banner .close_").eq(num_sock).trigger("click");
            }else{
                $(".bot_bg_banner").animate({"left":"0"},300);        
            } 
        })
    </script>
{% endput %}